package com.xtiim.battery.discharge.modules.htm.mapper;

import com.xtiim.battery.discharge.modules.htm.model.HostInfo;
import com.xtiim.battery.discharge.modules.htm.param.HostInfoQueryParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * HostInfoMapper
 */
public interface HostInfoMapper {

    /**
     * insert host info
     * @param hostInfo
     * @return
     */
    Boolean insert(HostInfo hostInfo);

    /**
     * select host info by name or number
     * @param name
     * @param number
     * @return
     */
    HostInfo selectHostInfo(@Param("name") String name, @Param("number") String number);

    /**
     * update host info
     * @param hostInfo
     * @return
     */
    Boolean update(HostInfo hostInfo);

    /**
     * get host info count
     * @param queryParam
     * @return
     */
    Integer getHostInfoCount(HostInfoQueryParam queryParam);

    /**
     * get host info page
     * @param queryParam
     * @param offset
     * @param pageSize
     * @return
     */
    List<HostInfo> getHostInfoPage(@Param("queryParam") HostInfoQueryParam queryParam, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);

    /**
     * get all host info
     * @return
     */
    List<HostInfo> getAllHostInfos();

    /**
     * delete host info
     * @param id
     * @return
     */
    Boolean delete(Long id);

    /**
     * get host info by id
     * @param id
     * @return
     */
    HostInfo getHostInfoById(Long id);

    /**
     * get all opened host info
     * @return
     */
    List<HostInfo> getAllOpenedHostInfos();
}
